# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=secsipidx
pkgver=1.2.0
pkgrel=3
pkgdesc="Secure SIP/Telephony Identity Extensions"
url="https://github.com/asipto/secsipidx"
arch="all"
license="GPL-2.0-only"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/asipto/secsipidx/archive/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v
}

check() {
	./secsipidx -version | grep -q "v$pkgver"
}

package() {
	install -D -m755 secsipidx "$pkgdir"/usr/bin/secsipidx
}

sha512sums="
fff458373560729f3de09649084e44a37932c3c7645f0eab23112078cbd7216065e700aa97c25e83f64e4d19b2a167a78e35b49e9009429c40e5845eeb5ea00f  secsipidx-1.2.0.tar.gz
"
